from PySide6.QtWidgets import QApplication,QDialog
from PySide6 import QtCore
import sys,pyperclip
from caseTranform import Ui_caseTranform
from caseChange import caseChangeThread,caseTranform

class Tranform(QDialog):
    def __init__(self):
        super().__init__()
        self.ui = Ui_caseTranform()
        self.ui.setupUi(self)
        self.setWindowFlag(QtCore.Qt.FramelessWindowHint)
        self.setAttribute(QtCore.Qt.WA_TranslucentBackground)
        self.result = ''

    def tranformFun(self):
        num_str = self.ui.num_str.text()
        case = caseTranform(num_str)
        self.result = case.convert_number()
        self.ui.integer.setText(self.result)
        pyperclip.copy(self.result)

    def copyFun(self):
        pyperclip.copy(self.result)

if __name__ == "__main__":
    app = QApplication(sys.argv)
    win = Tranform()
    win.show()
    sys.exit(app.exec())
